using RxjhServer.DbClss;
using RxjhServer.Network;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

namespace RxjhServer
{
	public class 灵兽类 : IDisposable
	{
		private float _人物坐标_X;

		private float _人物坐标_Y;

		private float _人物坐标_Z;

		private int _人物坐标_MAP;

		private long _Id;

		private int _Bs;

		private string _ZrName;

		private string _Name;

		private int _FLD_ZCD;

		private long _FLD_EXP;

		private long _最大经验;

		private long _FLD_EXP_MAX;

		private int _FLD_LEVEL;

		private int _FLD_JOB;

		private int _FLD_JOB_LEVEL;

		private int _FLD_HP;

		private int _FLD_HP_MAX;

		private int _FLD_MP;

		private int _FLD_MP_MAX;

		private int _FLD_负重;

		private int _FLD_负重_MAX;

		private int _FLD_攻击;

		private int _FLD_武功攻击;

		private int _FLD_防御;

		private int _FLD_武功防御;

		private int _FLD_命中;

		private int _FLD_回避;

		private int _骑;

		public int 全服ID;

		private int _FLD_MAGIC1;

		private int _FLD_MAGIC2;

		private int _FLD_MAGIC3;

		private int _FLD_MAGIC4;

		private int _FLD_MAGIC5;

		private double _FLD_装备_武功攻击力增加百分比;

		private double _FLD_装备_武功防御力增加百分比;

		private double _FLD_装备_追加_经验百分比;

		private double _FLD_装备_追加_获得游戏币百分比;

		private int _FLD_装备_追加_攻击;

		private int _FLD_装备_追加_防御;

		private int _FLD_装备_追加_命中;

		private int _FLD_装备_追加_回避;

		private int _FLD_装备_追加_HP;

		private int _FLD_装备_追加_MP;

		private int _FLD_死亡;

		public 物品类[] 宠物装备栏;

		public 物品类[] 宠物以装备;

		public 武功类[,] 武功 = new 武功类[2, 16];

		public List<攻击类> 攻击列表;

		public Players Playe;

		private NetState client;

		public float 人物坐标_X
		{
			get
			{
				return _人物坐标_X;
			}
			set
			{
				_人物坐标_X = value;
			}
		}

		public float 人物坐标_Y
		{
			get
			{
				return _人物坐标_Y;
			}
			set
			{
				_人物坐标_Y = value;
			}
		}

		public float 人物坐标_Z
		{
			get
			{
				return _人物坐标_Z;
			}
			set
			{
				_人物坐标_Z = value;
			}
		}

		public int 人物坐标_MAP
		{
			get
			{
				return _人物坐标_MAP;
			}
			set
			{
				_人物坐标_MAP = value;
			}
		}

		public long Id
		{
			get
			{
				return _Id;
			}
			set
			{
				_Id = value;
			}
		}

		public int Bs
		{
			get
			{
				return _Bs;
			}
			set
			{
				_Bs = value;
			}
		}

		public string ZrName
		{
			get
			{
				return _ZrName;
			}
			set
			{
				_ZrName = value;
			}
		}

		public string Name
		{
			get
			{
				return _Name;
			}
			set
			{
				_Name = value;
			}
		}

		public int FLD_ZCD
		{
			get
			{
				return _FLD_ZCD;
			}
			set
			{
				_FLD_ZCD = value;
			}
		}

		public long FLD_EXP
		{
			get
			{
				return _FLD_EXP;
			}
			set
			{
				_FLD_EXP = value;
			}
		}

		public long 最大经验
		{
			get
			{
				return _最大经验;
			}
			set
			{
				_最大经验 = value;
			}
		}

		public long FLD_EXP_MAX
		{
			get
			{
				return _FLD_EXP_MAX;
			}
			set
			{
				_FLD_EXP_MAX = value;
			}
		}

		public int FLD_LEVEL
		{
			get
			{
				return _FLD_LEVEL;
			}
			set
			{
				_FLD_LEVEL = value;
			}
		}

		public int FLD_JOB
		{
			get
			{
				return _FLD_JOB;
			}
			set
			{
				_FLD_JOB = value;
			}
		}

		public int FLD_JOB_LEVEL
		{
			get
			{
				return _FLD_JOB_LEVEL;
			}
			set
			{
				_FLD_JOB_LEVEL = value;
			}
		}

		public int FLD_HP
		{
			get
			{
				return _FLD_HP;
			}
			set
			{
				_FLD_HP = value;
			}
		}

		public int FLD_HP_MAX
		{
			get
			{
				return _FLD_HP_MAX;
			}
			set
			{
				_FLD_HP_MAX = value;
			}
		}

		public int FLD_MP
		{
			get
			{
				return _FLD_MP;
			}
			set
			{
				_FLD_MP = value;
			}
		}

		public int FLD_MP_MAX
		{
			get
			{
				return _FLD_MP_MAX;
			}
			set
			{
				_FLD_MP_MAX = value;
			}
		}

		public int FLD_负重
		{
			get
			{
				return _FLD_负重;
			}
			set
			{
				_FLD_负重 = value;
			}
		}

		public int FLD_负重_MAX
		{
			get
			{
				return _FLD_负重_MAX;
			}
			set
			{
				_FLD_负重_MAX = value;
			}
		}

		public int FLD_攻击
		{
			get
			{
				return _FLD_攻击;
			}
			set
			{
				_FLD_攻击 = value;
			}
		}

		public int FLD_武功攻击
		{
			get
			{
				return _FLD_武功攻击;
			}
			set
			{
				_FLD_武功攻击 = value;
			}
		}

		public int FLD_防御
		{
			get
			{
				return _FLD_防御;
			}
			set
			{
				_FLD_防御 = value;
			}
		}

		public int FLD_武功防御
		{
			get
			{
				return _FLD_武功防御;
			}
			set
			{
				_FLD_武功防御 = value;
			}
		}

		public int FLD_命中
		{
			get
			{
				return _FLD_命中;
			}
			set
			{
				_FLD_命中 = value;
			}
		}

		public int FLD_回避
		{
			get
			{
				return _FLD_回避;
			}
			set
			{
				_FLD_回避 = value;
			}
		}

		public int 骑
		{
			get
			{
				return _骑;
			}
			set
			{
				_骑 = value;
			}
		}

		public int FLD_MAGIC1
		{
			get
			{
				return _FLD_MAGIC1;
			}
			set
			{
				_FLD_MAGIC1 = value;
			}
		}

		public int FLD_MAGIC2
		{
			get
			{
				return _FLD_MAGIC2;
			}
			set
			{
				_FLD_MAGIC2 = value;
			}
		}

		public int FLD_MAGIC3
		{
			get
			{
				return _FLD_MAGIC3;
			}
			set
			{
				_FLD_MAGIC3 = value;
			}
		}

		public int FLD_MAGIC4
		{
			get
			{
				return _FLD_MAGIC4;
			}
			set
			{
				_FLD_MAGIC4 = value;
			}
		}

		public int FLD_MAGIC5
		{
			get
			{
				return _FLD_MAGIC5;
			}
			set
			{
				_FLD_MAGIC5 = value;
			}
		}

		public double FLD_装备_武功攻击力增加百分比
		{
			get
			{
				return _FLD_装备_武功攻击力增加百分比;
			}
			set
			{
				_FLD_装备_武功攻击力增加百分比 = value;
			}
		}

		public double FLD_装备_武功防御力增加百分比
		{
			get
			{
				return _FLD_装备_武功防御力增加百分比;
			}
			set
			{
				_FLD_装备_武功防御力增加百分比 = value;
			}
		}

		public double FLD_装备_追加_经验百分比
		{
			get
			{
				return _FLD_装备_追加_经验百分比;
			}
			set
			{
				_FLD_装备_追加_经验百分比 = value;
			}
		}

		public double FLD_装备_追加_获得游戏币百分比
		{
			get
			{
				return _FLD_装备_追加_获得游戏币百分比;
			}
			set
			{
				_FLD_装备_追加_获得游戏币百分比 = value;
			}
		}

		public int FLD_装备_追加_攻击
		{
			get
			{
				return _FLD_装备_追加_攻击;
			}
			set
			{
				_FLD_装备_追加_攻击 = value;
			}
		}

		public int FLD_装备_追加_防御
		{
			get
			{
				return _FLD_装备_追加_防御;
			}
			set
			{
				_FLD_装备_追加_防御 = value;
			}
		}

		public int FLD_装备_追加_命中
		{
			get
			{
				return _FLD_装备_追加_命中;
			}
			set
			{
				_FLD_装备_追加_命中 = value;
			}
		}

		public int FLD_装备_追加_回避
		{
			get
			{
				return _FLD_装备_追加_回避;
			}
			set
			{
				_FLD_装备_追加_回避 = value;
			}
		}

		public int FLD_装备_追加_HP
		{
			get
			{
				return _FLD_装备_追加_HP;
			}
			set
			{
				_FLD_装备_追加_HP = value;
			}
		}

		public int FLD_装备_追加_MP
		{
			get
			{
				return _FLD_装备_追加_MP;
			}
			set
			{
				_FLD_装备_追加_MP = value;
			}
		}

		public int 灵兽最大_HP => FLD_HP_MAX + FLD_装备_追加_HP;

		public int 灵兽最大_MP => FLD_MP_MAX + FLD_装备_追加_MP;

		public int 灵兽_攻击力 => FLD_攻击 + FLD_装备_追加_攻击;

		public int 灵兽_防御力 => FLD_防御 + FLD_装备_追加_防御;

		public int 灵兽_命中 => FLD_命中 + FLD_装备_追加_命中;

		public int 灵兽_回避 => FLD_回避 + FLD_装备_追加_回避;

		public int 灵兽_武功攻击力 => (int)((double)FLD_武功攻击 * 0.01 + FLD_装备_武功攻击力增加百分比);

		public int 灵兽_武功防御力 => (int)((double)FLD_武功防御 * 0.01 + FLD_装备_武功防御力增加百分比);

		public int FLD_死亡
		{
			get
			{
				return _FLD_死亡;
			}
			set
			{
				_FLD_死亡 = value;
			}
		}

		~灵兽类()
		{
		}

		public void Dispose()
		{
			Playe = null;
			client = null;
		}

		public 灵兽类(long id, NetState clien, DataTable table2)
		{
			client = clien;
			_Id = id;
			ZrName = table2.Rows[0]["ZrName"].ToString();
			Name = table2.Rows[0]["Name"].ToString();
			FLD_ZCD = (int)table2.Rows[0]["FLD_ZCD"];
			FLD_EXP = long.Parse(table2.Rows[0]["FLD_EXP"].ToString());
			FLD_LEVEL = (int)table2.Rows[0]["FLD_LEVEL"];
			FLD_JOB = (int)table2.Rows[0]["FLD_JOB"];
			FLD_JOB_LEVEL = (int)table2.Rows[0]["FLD_JOB_LEVEL"];
			FLD_HP = (int)table2.Rows[0]["FLD_HP"];
			FLD_HP_MAX = (int)table2.Rows[0]["FLD_HP"];
			FLD_MP = (int)table2.Rows[0]["FLD_MP"];
			FLD_MP_MAX = (int)table2.Rows[0]["FLD_MP"];
			Bs = (int)table2.Rows[0]["FLD_BS"];
			FLD_MAGIC1 = (int)table2.Rows[0]["FLD_MAGIC1"];
			FLD_MAGIC2 = (int)table2.Rows[0]["FLD_MAGIC2"];
			FLD_MAGIC3 = (int)table2.Rows[0]["FLD_MAGIC3"];
			FLD_MAGIC4 = (int)table2.Rows[0]["FLD_MAGIC4"];
			FLD_MAGIC5 = (int)table2.Rows[0]["FLD_MAGIC5"];
			FLD_死亡 = (int)table2.Rows[0]["FLD_SW"];
			FLD_EXP_MAX = 100000L;
			FLD_攻击 = 100;
			FLD_武功攻击 = 100;
			FLD_防御 = 100;
			FLD_武功防御 = 100;
			FLD_命中 = 1000;
			FLD_回避 = 1000;
			FLD_负重 = 0;
			FLD_负重_MAX = 100;
			宠物装备栏 = new 物品类[16];
			宠物以装备 = new 物品类[4];
			byte[] src = (byte[])table2.Rows[0]["FLD_ITEM"];
			for (int i = 0; i < 16; i++)
			{
				byte[] array = new byte[37];
				try
				{
					Buffer.BlockCopy(src, i * 37, array, 0, 37);
				}
				catch (Exception value)
				{
					Console.WriteLine(value);
				}
				宠物装备栏[i] = new 物品类(array, i);
				_FLD_负重 += 宠物装备栏[i].物品总重量;
			}
			byte[] src2 = (byte[])table2.Rows[0]["FLD_WEARITEM"];
			for (int j = 0; j < 4; j++)
			{
				byte[] array2 = new byte[37];
				try
				{
					Buffer.BlockCopy(src2, j * 37, array2, 0, 37);
				}
				catch (Exception value2)
				{
					Console.WriteLine(value2);
				}
				宠物以装备[j] = new 物品类(array2, j);
				_FLD_负重 += 宠物以装备[j].物品总重量;
			}
			byte[] src3 = (byte[])table2.Rows[0]["FLD_KONGFU"];
			for (int k = 0; k < 16; k++)
			{
				byte[] array3 = new byte[4];
				try
				{
					Buffer.BlockCopy(src3, k * 4, array3, 0, 4);
				}
				catch (Exception value3)
				{
					Console.WriteLine(value3);
				}
				武功[0, k] = new 武功类(BitConverter.ToInt32(array3, 0));
				try
				{
					Buffer.BlockCopy(src3, (k + 16) * 4, array3, 0, 4);
				}
				catch (Exception value4)
				{
					Console.WriteLine(value4);
				}
				武功[1, k] = new 武功类(BitConverter.ToInt32(array3, 0));
			}
			计算基本数据();
		}

		public void 得到灵兽丹基本属性(string ysqh)
		{
			try
			{
				string s;
				switch (ysqh.Length)
				{
				default:
					return;
				case 8:
					s = ysqh.Substring(0, 1);
					break;
				case 9:
					s = ysqh.Substring(0, 2);
					break;
				}
				int num = int.Parse(ysqh) - int.Parse(s) * 10000000;
				switch (int.Parse(s))
				{
				case 8:
				case 9:
				case 10:
				case 13:
					break;
				case 1:
					FLD_装备_追加_攻击 += num;
					break;
				case 2:
					FLD_装备_追加_防御 += num;
					break;
				case 3:
					FLD_装备_追加_HP += num;
					break;
				case 4:
					FLD_装备_追加_MP += num;
					break;
				case 5:
					FLD_装备_追加_命中 += num;
					break;
				case 6:
					FLD_装备_追加_回避 += num;
					break;
				case 7:
					FLD_装备_武功攻击力增加百分比 += (double)num / World.武功攻击力控制;
					break;
				case 11:
					FLD_装备_武功防御力增加百分比 += (double)num / World.武功防御力控制;
					break;
				case 12:
					FLD_装备_追加_获得游戏币百分比 += (double)num / 100.0;
					break;
				case 14:
					FLD_装备_追加_经验百分比 += (double)num / 100.0;
					break;
				case 15:
					FLD_装备_追加_经验百分比 += (double)num / 100.0;
					break;
				}
			}
			catch (Exception ex)
			{
				Form1.WriteLine(1, "得到基本属性 出错：" + ex?.ToString());
			}
		}

		public void 计算装备数据()
		{
			FLD_装备_武功攻击力增加百分比 = 0.0;
			FLD_装备_武功防御力增加百分比 = 0.0;
			FLD_装备_追加_攻击 = 0;
			FLD_装备_追加_防御 = 0;
			FLD_装备_追加_命中 = 0;
			FLD_装备_追加_回避 = 0;
			FLD_装备_追加_HP = 0;
			FLD_装备_追加_MP = 0;
			FLD_装备_追加_获得游戏币百分比 = 0.0;
			FLD_装备_追加_经验百分比 = 0.0;
			try
			{
				得到灵兽丹基本属性(FLD_MAGIC1.ToString());
				得到灵兽丹基本属性(FLD_MAGIC2.ToString());
				得到灵兽丹基本属性(FLD_MAGIC3.ToString());
				得到灵兽丹基本属性(FLD_MAGIC4.ToString());
				得到灵兽丹基本属性(FLD_MAGIC5.ToString());
				for (int i = 0; i < 4; i++)
				{
					宠物以装备[i].得到物品属性方法();
					FLD_装备_追加_攻击 += (宠物以装备[i].物品攻击力 + 宠物以装备[i].物品攻击力MAX) / 2;
					FLD_装备_追加_防御 += 宠物以装备[i].物品防御力;
					FLD_装备_追加_命中 += 宠物以装备[i].物品属性_命中率增加;
					FLD_装备_追加_回避 += 宠物以装备[i].物品属性_回避率增加;
					double num = 宠物以装备[i].物品属性_武功攻击力;
					double num2 = 宠物以装备[i].物品属性_武功防御力增加;
					FLD_装备_武功攻击力增加百分比 += num / World.武功攻击力控制;
					FLD_装备_武功防御力增加百分比 += num2 / World.武功防御力控制;
					FLD_装备_追加_HP += 宠物以装备[i].物品属性_生命力增加;
					FLD_装备_追加_MP += 宠物以装备[i].物品属性_内功力增加;
				}
			}
			catch (Exception ex)
			{
				Form1.WriteLine(1, "计算装备数据错误,错误代码 " + ex?.ToString());
			}
		}

		public void 计算基本数据()
		{
			if (FLD_LEVEL > 99)
			{
				FLD_LEVEL = 99;
			}
			最大经验 = (long)World.Patlever[FLD_LEVEL];
			int fLD_LEVEL = FLD_LEVEL;
			while (FLD_EXP >= 最大经验 && FLD_LEVEL < 99)
			{
				if (client == null || !client.Running)
				{
					return;
				}
				FLD_LEVEL++;
				最大经验 = (long)World.Patlever[FLD_LEVEL];
			}
			if (FLD_LEVEL - fLD_LEVEL > 0)
			{
				client.Player.灵兽升级后的提示();
			}
			FLD_负重_MAX = 500 + 20 * FLD_LEVEL;
			switch (_FLD_JOB)
			{
			case 1:
			{
				_FLD_HP_MAX = 133 + FLD_LEVEL * 12;
				_FLD_MP_MAX = 114 + FLD_LEVEL * 2;
				FLD_命中 = 8 + FLD_LEVEL;
				FLD_回避 = 8 + FLD_LEVEL;
				FLD_攻击 = 9;
				FLD_防御 = 16;
				for (int l = 2; l <= FLD_LEVEL; l++)
				{
					if (l % 2 == 0)
					{
						FLD_攻击 += 2;
						FLD_防御 += 2;
					}
					else
					{
						FLD_攻击++;
						FLD_防御++;
					}
				}
				break;
			}
			case 2:
			{
				_FLD_HP_MAX = 133 + FLD_LEVEL * 12;
				_FLD_MP_MAX = 114 + FLD_LEVEL * 2;
				FLD_命中 = 8 + FLD_LEVEL;
				FLD_回避 = 8 + FLD_LEVEL;
				FLD_攻击 = 9;
				FLD_防御 = 16;
				for (int j = 2; j <= FLD_LEVEL; j++)
				{
					if (j % 2 == 0)
					{
						FLD_攻击 += 3;
						FLD_防御 += 2;
					}
					else
					{
						FLD_攻击 += 2;
						FLD_防御++;
					}
				}
				break;
			}
			case 3:
			{
				_FLD_HP_MAX = 133 + FLD_LEVEL * 12;
				_FLD_MP_MAX = 114 + FLD_LEVEL * 2;
				FLD_命中 = 8 + FLD_LEVEL;
				FLD_回避 = 8 + FLD_LEVEL;
				FLD_攻击 = 9;
				FLD_防御 = 16;
				for (int k = 2; k <= FLD_LEVEL; k++)
				{
					if (k % 2 == 0)
					{
						FLD_攻击 += 2;
						FLD_防御 += 2;
					}
					else
					{
						FLD_攻击++;
						FLD_防御 += 2;
					}
				}
				break;
			}
			case 4:
			{
				_FLD_HP_MAX = 133 + FLD_LEVEL * 12;
				_FLD_MP_MAX = 114 + FLD_LEVEL * 2;
				FLD_命中 = 8 + FLD_LEVEL;
				FLD_回避 = 8 + FLD_LEVEL;
				FLD_攻击 = 9;
				FLD_防御 = 16;
				for (int i = 2; i <= FLD_LEVEL; i++)
				{
					if (i % 2 == 0)
					{
						FLD_攻击 += 2;
						FLD_防御 += 3;
					}
					else
					{
						FLD_攻击++;
						FLD_防御 += 2;
					}
				}
				break;
			}
			}
			switch (_FLD_JOB_LEVEL)
			{
			case 1:
				FLD_武功攻击 += 20;
				FLD_武功防御 += 20;
				FLD_攻击 += 20;
				FLD_防御 += 20;
				_FLD_HP_MAX += 85;
				_FLD_MP_MAX += 50;
				break;
			case 2:
				FLD_武功攻击 += 50;
				FLD_武功防御 += 50;
				FLD_攻击 += 50;
				FLD_防御 += 50;
				_FLD_HP_MAX += 200;
				_FLD_MP_MAX += 150;
				break;
			case 3:
				FLD_武功攻击 += 100;
				FLD_武功防御 += 100;
				FLD_攻击 += 100;
				FLD_防御 += 100;
				_FLD_HP_MAX += 400;
				_FLD_MP_MAX += 350;
				break;
			}
			FLD_HP = _FLD_HP_MAX;
			FLD_MP = _FLD_MP_MAX;
			计算装备数据();
		}

		public void 计算宠物基本数据()
		{
			int fLD_LEVEL = FLD_LEVEL;
			int num = FLD_LEVEL;
			long fLD_EXP = FLD_EXP;
			long num2 = 最大经验;
			最大经验 = (long)World.Patlever[FLD_LEVEL];
			int num3 = 0;
			while (FLD_LEVEL < 99)
			{
				if (fLD_EXP < num2)
				{
					double num4 = FLD_EXP - Convert.ToInt64(World.Patlever[FLD_LEVEL - 1]);
					if (num4 < 1.0)
					{
						FLD_EXP = Convert.ToInt64(World.Patlever[FLD_LEVEL - 1]);
						num--;
						long num5 = (long)World.Patlever[num];
					}
					break;
				}
				if (num3 > 100)
				{
					return;
				}
				num++;
				num2 = (long)World.Patlever[num];
				num3++;
			}
			if (num - fLD_LEVEL != 0)
			{
				计算基本数据();
			}
		}

		public void 保存数据()
		{
			SqlParameter[] prams = new SqlParameter[19]
			{
				SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, _Id.ToString()),
				SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, Name),
				SqlDBA.MakeInParam("@level", SqlDbType.Int, 0, FLD_LEVEL),
				SqlDBA.MakeInParam("@zcd", SqlDbType.Int, 10, FLD_ZCD),
				SqlDBA.MakeInParam("@job", SqlDbType.Int, 0, FLD_JOB),
				SqlDBA.MakeInParam("@job_level", SqlDbType.Int, 0, FLD_JOB_LEVEL),
				SqlDBA.MakeInParam("@exp", SqlDbType.VarChar, 50, FLD_EXP.ToString()),
				SqlDBA.MakeInParam("@hp", SqlDbType.Int, 0, FLD_HP),
				SqlDBA.MakeInParam("@mp", SqlDbType.Int, 0, FLD_MP),
				SqlDBA.MakeInParam("@strWearitem", SqlDbType.VarBinary, 292, GetWEARITEMCodes()),
				SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 1168, GetFLD_ITEMCodes()),
				SqlDBA.MakeInParam("@strKongfu", SqlDbType.VarBinary, 128, GetFLD_KONGFUCodes()),
				SqlDBA.MakeInParam("@bs", SqlDbType.Int, 0, Bs),
				SqlDBA.MakeInParam("@sw", SqlDbType.Int, 0, FLD_死亡),
				SqlDBA.MakeInParam("@magic1", SqlDbType.Int, 0, _FLD_MAGIC1),
				SqlDBA.MakeInParam("@magic2", SqlDbType.Int, 0, _FLD_MAGIC2),
				SqlDBA.MakeInParam("@magic3", SqlDbType.Int, 0, _FLD_MAGIC3),
				SqlDBA.MakeInParam("@magic4", SqlDbType.Int, 0, _FLD_MAGIC4),
				SqlDBA.MakeInParam("@magic5", SqlDbType.Int, 0, _FLD_MAGIC5)
			};
			DbPoolClass dbPoolClass = new DbPoolClass();
			dbPoolClass.Conn = DBA.getstrConnection(null);
			dbPoolClass.Prams = prams;
			dbPoolClass.Sql = "UPDATE_Cw_DATA";
			World.SqlPool.Enqueue(dbPoolClass);
		}

		public byte[] GetWEARITEMCodes()
		{
			byte[] array = new byte[148];
			for (int i = 0; i < 4; i++)
			{
				byte[] src;
				try
				{
					src = 宠物以装备[i].物品_byte;
				}
				catch
				{
					src = new byte[37];
				}
				Buffer.BlockCopy(src, 0, array, i * 37, 37);
			}
			return array;
		}

		public byte[] GetFLD_ITEMCodes()
		{
			byte[] array = new byte[592];
			for (int i = 0; i < 16; i++)
			{
				byte[] src;
				try
				{
					src = 宠物装备栏[i].物品_byte;
				}
				catch
				{
					src = new byte[37];
				}
				Buffer.BlockCopy(src, 0, array, i * 37, 37);
			}
			return array;
		}

		public byte[] GetFLD_KONGFUCodes()
		{
			byte[] array = new byte[128];
			for (int i = 0; i < 16; i++)
			{
				byte[] src;
				try
				{
					src = 武功[0, i].武功ID_byte;
				}
				catch
				{
					src = new byte[4];
				}
				Buffer.BlockCopy(src, 0, array, i * 4, 4);
				try
				{
					src = 武功[1, i].武功ID_byte;
				}
				catch
				{
					src = new byte[4];
				}
				Buffer.BlockCopy(src, 0, array, (i + 16) * 4, 4);
			}
			return array;
		}
	}
}
